var a = b = c = d = e = 0;
var time = addr = "";
var surveyFlag = surveyFlag;
var fav = true;
var FavUrl = FavTitle = lc = Host = HostUrl = "";
var Rate = 0;
var DialogWidth = 300;
var DialogHeight = 300;
var first = "";
function SetFirst(sName)
{
if (first == "") first = sName;
}
function fnAddToFavs()
{
c++;
SetFirst('3');
fav = false;
null; (FavUrl, FavTitle);
}
function DoPopup()
{
try
{
if (surveyFlag == null || surveyFlag == false)
{
if (Math.random() <= Rate)
{
if (GetCookie("cars") == null)
{
SetCookie("cars", "1");
var retVal = window.showModalDialog("/library/mnp/2/aspx/surveypopup.aspx?locale=" + lc,"","dialogHeight:" + DialogHeight + "px; dialogWidth:" + DialogWidth + "px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; scroll: No; status: No; unadorned: Yes; ");
if (retVal != null)
{
if (retVal != false)
{
time = retVal.substring(0, retVal.indexOf(";"));
addr = retVal.substring(retVal.indexOf(";") + 1, retVal.length);
}
}
}
}
}
}
catch (e)
{
//noop
}
}
function GetCookie(sName)
{
//cookies are separated by semicolons
var aCookie = document.cookie.split("; ");
CookieLength = aCookie.length;
for (var i=0; i < CookieLength; i++)
{
// a name/value pair (a crumb) is separated by an equal sign
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0]) return unescape(aCrumb[1]);
}
// a cookie with the requested name does not exist
return null;
}
function SetCookie(sName, sValue)
{
var date = new Date();
date.setDate(date.getDate() + 90);
document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString() + "; path=/; domain=microsoft.com";
}
window.UnLoadOff=UnLoad;
function UnLoad()
{
if (a > 0 || b > 0 || c > 0 || d > 0 || e > 0)
{
ListenerFrame.navigate('/library/mnp/2/aspx/listener.aspx?s=' + encodeURIComponent(Host + '^' + HostUrl + '^' + a + '^' + b + '^' + c + '^' + d + "^" + e + "^" + time + "^" + addr + "^" + FavTitle + "^" + lc + "^" + FavUrl + "^" + first));
}
}
window.onbeforeunload = BeforeUnload;
function BeforeUnload()
{
if (a > 0 || b > 0 || c > 0 || d > 0 || e > 0)
{
if (fav)
DoPopup();
else
fav = true;
}
}
window.onbeforeprint = BeforePrint;
function BeforePrint()
{
SetFirst('1');
a++;
}
var mnpMenuTop = null;
var mnpMenuKill = null;
var mnpMenuPopup = null;
var mnpMenuUrl = null;
var mnpMenuParent = null;
var mnpMenuScrollTimer = null;
var mnpMenuShadows = new Array();
var mnpMenuDirSave = "LTR";
var mnpMenuCTSave = false;
var mnpMenuRenderStart = null;
var mnpMenuShadowsEnabled = true;
window.attachEvent("onload", mnpMenuInit);
function mnpMenuInit()
{
try
{
mnpMenuDirSave = mnpMenuDir();
mnpMenuCTSave = mnpMenuCT();
}
catch(e)
{
return;
}
mnpMenuTop = document.getElementById("mnpMenuTop");
mnpMenuUrl = mnpMenuTop.getAttribute("url");
mnpMenuParent = mnpMenuTop.getAttribute("parent");
mnpMenuAttach(mnpMenuTop);
}
function mnpPage(label, url, target, menu, linkID)
{
this.label = label;
this.url = url;
this.target = target;
this.menu = menu;
this.linkID = linkID;
}
function mnpLabel(label)
{
this.label = label;
}
function mnpMenuEnter()
{
if (mnpMenuKill)
{
window.clearTimeout(mnpMenuKill);
mnpMenuKill = null;
}
}
function mnpMenuLeave()
{
mnpMenuKill = window.setTimeout("mnpMenuKiller()", 200);
}
function mnpMenuKiller()
{
mnpKillMenu(mnpMenuTop.getAttribute("currentMenu"));
mnpMenuTop.removeAttribute("currentMenu");
}
function mnpMenuAttach(el)
{
el.attachEvent("onmouseenter", mnpMenuEnter);
el.attachEvent("onmouseleave", mnpMenuLeave);
var divs = el.getElementsByTagName("DIV");
for (var i=0; i < divs.length; i++)
{
var div = divs.item(i);
if (div.className == "mnpMenuRow")
{
div.attachEvent("onmouseenter", mnpMenuMouseover);
div.attachEvent("onmouseleave", mnpMenuMouseout);
div.attachEvent("onmousedown", mnpMenuMousedown);
div.attachEvent("onmouseup", mnpMenuMouseup);
div.setAttribute("save-background", div.style.background);
div.setAttribute("save-border", div.style.borderColor);
var a = div.getElementsByTagName("A");
if (a.length > 0)
{
var a0 = a[0];
if (a0.getAttribute("aoff"))
a0.outerHTML = a0.innerHTML;
else
{
div.setAttribute("status", a0.href);
div.attachEvent("onclick", mnpMenuClick);
}
}
if (div.getAttribute("menu"))
{
var imgs = div.getElementsByTagName("IMG");
if (imgs.length > 0)
{
var img = imgs[0];
img.style.visibility = "visible";
}
else
{
var x;
if (mnpMenuDirSave == "LTR")
x = (div.offsetWidth - 10) + "px";
else if (mnpMenuTop.contains(div))
x = "4px";
else
x = "6px";
var img = "";
div.insertAdjacentHTML("afterBegin", img);
}
}
}
}
}
function mnpMenuClick()
{
var div = window.event.srcElement;
var a = div.getElementsByTagName("A");
if (a.length == 0) return;
if (window.event.shiftKey)
{
var target = a[0].target;
a[0].target = "_new";
a[0].click();
a[0].target = target;
}
else
a[0].click();
}
function mnpKillMenu(id)
{
if (id == null) return;
var menu = document.getElementById(id);
var current = menu.getAttribute("currentMenu");
if (current)
{
mnpKillMenu(current);
menu.removeAttribute("currentMenu");
}
var temp = mnpMenuShadows[id];
if (temp)
{
var i;
for (i=0; i